home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
90%
| dexvert
| Hypertext Markup Language File (text/html)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| HTML document text
| default (weak)
| |
99%
| file
| LaTeX document text
| default
| |
98%
| file
| exported SGML document text
| default
| |
97%
| file
| exported SGML document, ASCII text, with CRLF, LF line terminators
| default
| |
80%
| TrID
| HyperText Markup Language with DOCTYPE
| default
| |
19%
| TrID
| HyperText Markup Language
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| gt2
| HTML (Hyper Text Markup Language) Datei
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| text/html
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 49 6d | 70 6c 65 6d 65 6e 74 61 |ts of Im|plementa|
|000000b0| 74 69 6f 6e 3c 2f 54 49 | 54 4c 45 3e 0a 0a 3c 4d |tion</TI|TLE>..<M|
|000000c0| 45 54 41 20 48 54 54 50 | 2d 45 51 55 49 56 3d 22 |ETA HTTP|-EQUIV="|
|000000d0| 43 6f 6e 74 65 6e 74 2d | 54 79 70 65 22 20 43 4f |Content-|Type" CO|
|000000e0| 4e 54 45 4e 54 3d 22 74 | 65 78 74 2f 68 74 6d 6c |NTENT="t|ext/html|
|000000f0| 3b 20 63 68 61 72 73 65 | 74 3d 75 74 66 2d 38 22 |; charse|t=utf-8"|
|00000100| 3e 0a 3c 4d 45 54 41 20 | 4e 41 4d 45 3d 22 76 69 |>.<META |NAME="vi|
|00000110| 65 77 70 6f 72 74 22 20 | 43 4f 4e 54 45 4e 54 3d |ewport" |CONTENT=|
|00000120| 22 77 69 64 74 68 3d 64 | 65 76 69 63 65 2d 77 69 |"width=d|evice-wi|
|00000130| 64 74 68 2c 20 69 6e 69 | 74 69 61 6c 2d 73 63 61 |dth, ini|tial-sca|
|00000140| 6c 65 3d 31 2e 30 22 3e | 0a 3c 4d 45 54 41 20 4e |le=1.0">|.<META N|
|00000150| 41 4d 45 3d 22 47 65 6e | 65 72 61 74 6f 72 22 20 |AME="Gen|erator" |
|00000160| 43 4f 4e 54 45 4e 54 3d | 22 4c 61 54 65 58 32 48 |CONTENT=|"LaTeX2H|
|00000170| 54 4d 4c 20 76 32 30 32 | 32 22 3e 0a 0a 3c 4c 49 |TML v202|2">..<LI|
|00000180| 4e 4b 20 52 45 4c 3d 22 | 53 54 59 4c 45 53 48 45 |NK REL="|STYLESHE|
|00000190| 45 54 22 20 48 52 45 46 | 3d 22 6c 6f 63 6b 73 2e |ET" HREF|="locks.|
|000001a0| 63 73 73 22 3e 0a 0a 3c | 4c 49 4e 4b 20 52 45 4c |css">..<|LINK REL|
|000001b0| 3d 22 6e 65 78 74 22 20 | 48 52 45 46 3d 22 6e 6f |="next" |HREF="no|
|000001c0| 64 65 34 5f 6d 6e 2e 68 | 74 6d 6c 22 3e 0a 3c 4c |de4_mn.h|tml">.<L|
|000001d0| 49 4e 4b 20 52 45 4c 3d | 22 70 72 65 76 69 6f 75 |INK REL=|"previou|
|000001e0| 73 22 20 48 52 45 46 3d | 22 6e 6f 64 65 32 5f 6d |s" HREF=|"node2_m|
|000001f0| 6e 2e 68 74 6d 6c 22 3e | 0a 3c 4c 49 4e 4b 20 52 |n.html">|.<LINK R|
|00000200| 45 4c 3d 22 75 70 22 20 | 48 52 45 46 3d 22 6c 6f |EL="up" |HREF="lo|
|00000210| 63 6b 73 5f 6d 6e 2e 68 | 74 6d 6c 22 3e 0a 3c 4c |cks_mn.h|tml">.<L|
|00000220| 49 4e 4b 20 52 45 4c 3d | 22 6e 65 78 74 22 20 48 |INK REL=|"next" H|
|00000230| 52 45 46 3d 22 6e 6f 64 | 65 34 5f 6d 6e 2e 68 74 |REF="nod|e4_mn.ht|
|00000240| 6d 6c 22 3e 0a 3c 2f 48 | 45 41 44 3e 0a 20 0a 3c |ml">.</H|EAD>. .<|
|00000250| 42 4f 44 59 20 62 67 63 | 6f 6c 6f 72 3d 22 23 66 |BODY bgc|olor="#f|
|00000260| 66 66 66 66 66 22 20 74 | 65 78 74 3d 22 23 30 30 |fffff" t|ext="#00|
|00000270| 30 30 30 30 22 20 6c 69 | 6e 6b 3d 22 23 39 39 34 |0000" li|nk="#994|
|00000280| 34 45 45 22 20 76 6c 69 | 6e 6b 3d 22 23 30 30 30 |4EE" vli|nk="#000|
|00000290| 30 66 66 22 20 61 6c 69 | 6e 6b 3d 22 23 30 30 66 |0ff" ali|nk="#00f|
|000002a0| 66 30 30 22 3e 0a 0a 3c | 48 31 3e 3c 41 20 49 44 |f00">..<|H1><A ID|
|000002b0| 3d 22 53 45 43 54 49 4f | 4e 30 30 30 33 30 30 30 |="SECTIO|N0003000|
|000002c0| 30 30 30 30 30 30 30 30 | 30 30 30 30 30 22 3e 0a |00000000|00000">.|
|000002d0| 49 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 3c 2f |Implemen|tation</|
|000002e0| 41 3e 0a 3c 2f 48 31 3e | 0a 3c 50 3e 0a 3c 45 4d |A>.</H1>|.<P>.<EM|
|000002f0| 3e 3c 45 4d 3e 3c 45 4d | 3e 57 65 20 68 61 76 65 |><EM><EM|>We have|
|00000300| 20 63 68 6f 73 65 6e 20 | 74 6f 20 69 6d 70 6c 65 | chosen |to imple|
|00000310| 6d 65 6e 74 20 6c 6f 63 | 6b 73 20 75 73 69 6e 67 |ment loc|ks using|
|00000320| 20 72 65 67 75 6c 61 72 | 20 66 69 6c 65 73 20 61 | regular| files a|
|00000330| 6e 64 20 69 6e 64 65 78 | 20 6e 6f 64 65 73 2e 0d |nd index| nodes..|
|00000340| 0a 42 79 20 75 73 69 6e | 67 20 61 20 75 6e 69 71 |.By usin|g a uniq|
|00000350| 75 65 20 6e 61 6d 69 6e | 67 20 61 6c 67 6f 72 69 |ue namin|g algori|
|00000360| 74 68 6d 2c 20 77 65 20 | 61 72 65 20 61 62 6c 65 |thm, we |are able|
|00000370| 20 74 6f 20 69 6e 73 74 | 61 6e 74 6c 79 20 60 6b | to inst|antly `k|
|00000380| 6e 6f 77 27 0d 0a 74 68 | 65 20 6e 61 6d 65 20 6f |now'..th|e name o|
|00000390| 66 20 61 20 6c 6f 63 6b | 20 77 69 74 68 6f 75 74 |f a lock| without|
|000003a0| 20 68 61 76 69 6e 67 20 | 74 6f 20 73 65 61 72 63 | having |to searc|
|000003b0| 68 20 66 6f 72 20 69 74 | 20 6f 72 20 61 73 6b 20 |h for it| or ask |
|000003c0| 61 20 6d 61 6e 61 67 65 | 72 0d 0a 66 6f 72 20 74 |a manage|r..for t|
|000003d0| 68 65 20 64 61 74 61 2e | 20 54 68 69 73 20 6d 69 |he data.| This mi|
|000003e0| 6e 69 6d 69 7a 65 73 20 | 74 69 6d 65 20 63 6f 6e |nimizes |time con|
|000003f0| 73 75 6d 69 6e 67 20 63 | 61 6c 6c 73 20 74 6f 20 |suming c|alls to |
|00000400| 74 68 65 20 6e 65 74 77 | 6f 72 6b 20 6f 72 20 74 |the netw|ork or t|
|00000410| 6f 0d 0a 64 69 73 6b 2e | 0a 3c 2f 45 4d 3e 3c 2f |o..disk.|.</EM></|
|00000420| 45 4d 3e 3c 2f 45 4d 3e | 0a 3c 50 3e 0a 3c 45 4d |EM></EM>|.<P>.<EM|
|00000430| 3e 3c 45 4d 3e 3c 45 4d | 3e 49 6e 20 6f 72 64 65 |><EM><EM|>In orde|
|00000440| 72 20 74 6f 20 73 65 63 | 75 72 65 20 61 20 75 6e |r to sec|ure a un|
|00000450| 69 71 75 65 20 6e 61 6d | 65 2c 20 77 65 20 6e 65 |ique nam|e, we ne|
|00000460| 65 64 20 74 6f 20 70 72 | 6f 76 69 64 65 20 65 6e |ed to pr|ovide en|
|00000470| 6f 75 67 68 0d 0a 69 6e | 66 6f 72 6d 61 74 69 6f |ough..in|formatio|
|00000480| 6e 20 74 6f 20 62 65 20 | 61 62 6c 65 20 74 6f 20 |n to be |able to |
|00000490| 69 64 65 6e 74 69 66 79 | 20 65 61 63 68 20 61 74 |identify| each at|
|000004a0| 6f 6d 20 75 6e 69 71 75 | 65 6c 79 2e 20 54 68 69 |om uniqu|ely. Thi|
|000004b0| 73 20 69 73 0d 0a 70 72 | 65 73 65 6e 74 6c 79 20 |s is..pr|esently |
|000004c0| 61 63 63 6f 6d 70 6c 69 | 73 68 65 64 20 62 79 20 |accompli|shed by |
|000004d0| 70 61 73 73 69 6e 67 20 | 61 20 73 74 72 69 6e 67 |passing |a string|
|000004e0| 20 74 6f 20 74 68 65 20 | 6c 6f 63 6b 20 66 75 6e | to the |lock fun|
|000004f0| 63 74 69 6f 6e 20 77 68 | 69 63 68 0d 0a 63 61 6e |ction wh|ich..can|
|00000500| 20 62 65 20 63 6f 6d 62 | 69 6e 65 64 20 77 69 74 | be comb|ined wit|
|00000510| 68 20 6f 74 68 65 72 20 | 65 6c 65 6d 65 6e 74 73 |h other |elements|
|00000520| 20 73 75 63 68 20 61 73 | 20 74 68 65 20 68 6f 73 | such as| the hos|
|00000530| 74 20 6f 6e 20 77 68 69 | 63 68 20 74 68 65 20 6c |t on whi|ch the l|
|00000540| 6f 63 6b 0d 0a 77 61 73 | 20 63 72 65 61 74 65 64 |ock..was| created|
|00000550| 20 61 6e 64 20 61 6e 79 | 20 6f 74 68 65 72 20 72 | and any| other r|
|00000560| 65 6c 65 76 61 6e 74 20 | 69 6e 66 6f 72 6d 61 74 |elevant |informat|
|00000570| 69 6f 6e 2e 20 46 6f 72 | 20 63 6f 6e 76 65 6e 69 |ion. For| conveni|
|00000580| 65 6e 63 65 20 77 65 0d | 0a 63 6c 61 73 73 69 66 |ence we.|.classif|
|00000590| 79 20 61 74 6f 6d 73 20 | 77 69 74 68 20 61 6e 20 |y atoms |with an |
|000005a0| 6f 70 65 72 61 74 6f 72 | 2f 6f 70 65 72 61 6e 64 |operator|/operand|
|000005b0| 20 70 61 69 72 2e 20 46 | 6f 72 20 65 78 61 6d 70 | pair. F|or examp|
|000005c0| 6c 65 2c 20 63 6f 6e 73 | 69 64 65 72 20 61 0d 0a |le, cons|ider a..|
|000005d0| 6c 6f 63 6b 20 72 65 71 | 75 65 73 74 20 74 6f 20 |lock req|uest to |
|000005e0| 65 64 69 74 20 61 20 66 | 69 6c 65 2e 20 49 6e 20 |edit a f|ile. In |
|000005f0| 74 68 69 73 20 63 61 73 | 65 20 74 68 65 20 6f 70 |this cas|e the op|
|00000600| 65 72 61 74 6f 72 20 77 | 6f 75 6c 64 20 62 65 0d |erator w|ould be.|
|00000610| 0a 60 60 65 64 69 74 27 | 27 20 61 6e 64 20 74 68 |.``edit'|' and th|
|00000620| 65 20 6f 70 65 72 61 6e | 64 20 77 6f 75 6c 64 20 |e operan|d would |
|00000630| 62 65 20 74 68 65 20 6e | 61 6d 65 20 6f 66 20 74 |be the n|ame of t|
|00000640| 68 65 20 66 69 6c 65 2e | 20 54 68 65 20 6e 61 6d |he file.| The nam|
|00000650| 65 73 20 6d 75 73 74 0d | 0a 62 65 20 70 72 6f 63 |es must.|.be proc|
|00000660| 65 73 73 65 64 20 74 6f | 20 65 78 70 75 6e 67 65 |essed to| expunge|
|00000670| 20 75 6e 66 6f 72 74 75 | 6e 61 74 65 20 63 68 61 | unfortu|nate cha|
|00000680| 72 61 63 74 65 72 73 20 | 77 68 69 63 68 20 77 6f |racters |which wo|
|00000690| 75 6c 64 20 6c 65 61 64 | 20 74 6f 0d 0a 69 6c 6c |uld lead| to..ill|
|000006a0| 65 67 61 6c 20 66 69 6c | 65 20 6e 61 6d 65 73 2e |egal fil|e names.|
|000006b0| 0a 3c 2f 45 4d 3e 3c 2f | 45 4d 3e 3c 2f 45 4d 3e |.</EM></|EM></EM>|
|000006c0| 0a 3c 50 3e 0a 3c 45 4d | 3e 3c 45 4d 3e 3c 45 4d |.<P>.<EM|><EM><EM|
|000006d0| 3e 3c 46 4f 4e 54 20 53 | 49 5a 45 3d 22 2d 31 22 |><FONT S|IZE="-1"|
|000006e0| 3e 0d 0a 3c 2f 46 4f 4e | 54 3e 3c 2f 45 4d 3e 3c |>..</FON|T></EM><|
|000006f0| 2f 45 4d 3e 3c 2f 45 4d | 3e 3c 50 52 45 3e 0d 0a |/EM></EM|><PRE>..|
|00000700| 20 20 20 20 43 61 6e 6f | 6e 69 66 79 4e 61 6d 65 | Cano|nifyName|
|00000710| 28 63 68 61 72 20 2a 62 | 75 66 66 65 72 29 0d 0a |(char *b|uffer)..|
|00000720| 20 20 20 20 7b 0d 0a 20 | 20 20 20 66 6f 72 20 28 | {.. | for (|
|00000730| 73 70 20 3d 20 62 75 66 | 66 65 72 3b 20 2a 73 70 |sp = buf|fer; *sp|
|00000740| 20 21 3d 20 27 5c 30 27 | 3b 20 73 70 2b 2b 29 0d | != '\0'|; sp++).|
|00000750| 0a 20 20 20 20 20 20 20 | 7b 0d 0a 20 20 20 20 20 |. |{.. |
|00000760| 20 20 69 66 20 28 21 69 | 73 61 6c 6e 75 6d 28 2a | if (!i|salnum(*|
|00000770| 73 70 29 29 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |sp)).. | |
|00000780| 7b 0d 0a 20 20 20 20 20 | 20 20 20 20 20 2a 73 70 |{.. | *sp|
|00000790| 20 3d 20 27 5f 27 3b 0d | 0a 20 20 20 20 20 20 20 | = '_';.|. |
|000007a0| 20 20 20 7d 0d 0a 20 20 | 20 20 20 20 20 7d 0d 0a | }.. | }..|
|000007b0| 20 20 20 20 7d 0a 3c 2f | 50 52 45 3e 3c 45 4d 3e | }.</|PRE><EM>|
|000007c0| 3c 45 4d 3e 3c 45 4d 3e | 3c 46 4f 4e 54 20 53 49 |<EM><EM>|<FONT SI|
|000007d0| 5a 45 3d 22 2d 31 22 3e | 0d 0a 3c 2f 46 4f 4e 54 |ZE="-1">|..</FONT|
|000007e0| 3e 3c 2f 45 4d 3e 3c 2f | 45 4d 3e 3c 2f 45 4d 3e |></EM></|EM></EM>|
|000007f0| 0a 3c 50 3e 0a 3c 45 4d | 3e 57 65 20 75 73 65 20 |.<P>.<EM|>We use |
|00000800| 61 20 66 75 6e 63 74 69 | 6f 6e 20 3c 54 54 3e 43 |a functi|on <TT>C|
|00000810| 61 6e 6f 6e 69 66 79 4e | 61 6d 65 3c 2f 54 54 3e |anonifyN|ame</TT>|
|00000820| 28 3c 45 4d 3e 6e 61 6d | 65 3c 2f 45 4d 3e 29 20 |(<EM>nam|e</EM>) |
|00000830| 77 68 69 63 68 20 72 65 | 74 75 72 6e 73 20 61 0d |which re|turns a.|
|00000840| 0a 73 74 72 69 6e 67 20 | 73 75 69 74 61 62 6c 65 |.string |suitable|
|00000850| 20 66 6f 72 20 75 73 65 | 20 61 73 20 61 20 66 69 | for use| as a fi|
|00000860| 6c 65 6e 61 6d 65 2e 20 | 49 74 20 73 75 66 66 69 |lename. |It suffi|
|00000870| 63 65 73 20 74 6f 20 73 | 77 61 70 20 69 6c 6c 65 |ces to s|wap ille|
|00000880| 67 61 6c 0d 0a 63 68 61 | 72 61 63 74 65 72 73 20 |gal..cha|racters |
|00000890| 66 6f 72 20 61 6e 20 75 | 6e 64 65 72 73 63 6f 72 |for an u|nderscor|
|000008a0| 65 2c 20 66 6f 72 20 69 | 6e 73 74 61 6e 63 65 2e |e, for i|nstance.|
|000008b0| 0a 3c 2f 45 4d 3e 0a 3c | 50 3e 0a 3c 45 4d 3e 49 |.</EM>.<|P>.<EM>I|
|000008c0| 6e 20 6f 72 64 65 72 20 | 74 6f 20 66 75 6e 63 74 |n order |to funct|
|000008d0| 69 6f 6e 20 70 72 6f 70 | 65 72 6c 79 2c 20 74 68 |ion prop|erly, th|
|000008e0| 65 20 6c 6f 63 6b 2d 6e | 61 6d 65 20 6d 75 73 74 |e lock-n|ame must|
|000008f0| 20 62 65 20 64 69 66 66 | 65 72 65 6e 74 20 66 6f | be diff|erent fo|
|00000900| 72 0d 0a 65 61 63 68 20 | 64 69 73 74 69 6e 63 74 |r..each |distinct|
|00000910| 20 61 74 6f 6d 2c 20 62 | 75 74 20 6d 75 73 74 20 | atom, b|ut must |
|00000920| 62 65 20 63 6f 6e 73 74 | 61 6e 74 20 6f 76 65 72 |be const|ant over|
|00000930| 20 74 69 6d 65 20 73 6f | 20 74 68 61 74 20 6d 75 | time so| that mu|
|00000940| 6c 74 69 70 6c 65 0d 0a | 69 6e 73 74 61 6e 74 69 |ltiple..|instanti|
|00000950| 61 74 69 6f 6e 73 20 6f | 66 20 74 68 65 20 70 72 |ations o|f the pr|
|00000960| 6f 67 72 61 6d 20 77 69 | 6c 6c 20 61 6c 77 61 79 |ogram wi|ll alway|
|00000970| 73 20 66 69 6e 64 20 74 | 68 65 20 73 61 6d 65 20 |s find t|he same |
|00000980| 6c 6f 63 6b 2e 20 54 68 | 65 20 74 69 6d 65 0d 0a |lock. Th|e time..|
|00000990| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 73 68 6f 75 |informat|ion shou|
|000009a0| 6c 64 20 74 68 65 72 65 | 66 6f 72 65 20 6e 6f 74 |ld there|fore not|
|000009b0| 20 62 65 20 63 6f 64 65 | 64 20 69 6e 74 6f 20 74 | be code|d into t|
|000009c0| 68 65 20 6e 61 6d 65 20 | 6f 66 20 74 68 65 20 6c |he name |of the l|
|000009d0| 6f 63 6b 3b 0d 0a 69 6e | 73 74 65 61 64 2c 20 6f |ock;..in|stead, o|
|000009e0| 6e 65 20 72 65 6c 69 65 | 73 20 6f 6e 20 74 68 65 |ne relie|s on the|
|000009f0| 20 74 69 6d 65 20 73 74 | 61 6d 70 73 20 6f 6e 20 | time st|amps on |
|00000a00| 74 68 65 20 69 6e 6f 64 | 65 73 20 74 6f 20 64 65 |the inod|es to de|
|00000a10| 74 65 72 6d 69 6e 65 0d | 0a 74 68 65 69 72 20 61 |termine.|.their a|
|00000a20| 67 65 2e 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |ge. For |example,|
|00000a30| 20 77 68 65 6e 20 65 64 | 69 74 69 6e 67 20 74 68 | when ed|iting th|
|00000a40| 65 20 66 69 6c 65 20 3c | 54 54 3e 2f 65 74 63 2f |e file <|TT>/etc/|
|00000a50| 6d 6f 74 64 3c 2f 54 54 | 3e 20 6f 6e 20 68 6f 73 |motd</TT|> on hos|
|00000a60| 74 0d 0a 3c 54 54 3e 64 | 61 78 3c 2f 54 54 3e 2c |t..<TT>d|ax</TT>,|
|00000a70| 20 61 20 6c 6f 63 6b 20 | 6e 61 6d 65 64 0a 3c 2f | a lock |named.</|
|00000a80| 45 4d 3e 0a 3c 50 3e 3c | 50 52 45 3e 0d 0a 20 6c |EM>.<P><|PRE>.. l|
|00000a90| 6f 63 6b 2e 63 66 65 6e | 67 69 6e 65 5f 63 6f 6e |ock.cfen|gine_con|
|00000aa0| 66 2e 64 61 78 2e 65 64 | 69 74 66 69 6c 65 2e 5f |f.dax.ed|itfile._|
|00000ab0| 65 74 63 5f 6d 6f 74 64 | 0a 3c 2f 50 52 45 3e 0a |etc_motd|.</PRE>.|
|00000ac0| 3c 50 3e 0a 3c 45 4d 3e | 0d 0a 77 6f 75 6c 64 20 |<P>.<EM>|..would |
|00000ad0| 62 65 20 63 72 65 61 74 | 65 64 2e 0a 3c 2f 45 4d |be creat|ed..</EM|
|00000ae0| 3e 0a 3c 50 3e 0a 3c 45 | 4d 3e 57 65 20 63 72 65 |>.<P>.<E|M>We cre|
|00000af0| 61 74 65 20 74 77 6f 20 | 6b 69 6e 64 73 20 6f 66 |ate two |kinds of|
|00000b00| 20 6c 6f 63 6b 20 77 69 | 74 68 69 6e 20 74 68 65 | lock wi|thin the|
|00000b10| 20 3c 54 54 3e 47 65 74 | 4c 6f 63 6b 28 29 3c 2f | <TT>Get|Lock()</|
|00000b20| 54 54 3e 20 63 61 6c 6c | 3a 20 61 20 6c 6f 63 6b |TT> call|: a lock|
|00000b30| 0d 0a 66 6f 72 20 61 63 | 74 69 76 65 20 74 68 72 |..for ac|tive thr|
|00000b40| 65 61 64 73 20 6f 66 20 | 65 78 65 63 75 74 69 6f |eads of |executio|
|00000b50| 6e 20 77 68 69 63 68 20 | 62 6c 6f 63 6b 73 20 6d |n which |blocks m|
|00000b60| 75 6c 74 69 70 6c 65 20 | 69 6e 73 74 61 6e 74 69 |ultiple |instanti|
|00000b70| 61 74 69 6f 6e 73 0d 0a | 6f 66 20 61 20 70 72 6f |ations..|of a pro|
|00000b80| 63 65 73 73 2c 20 61 6e | 64 20 61 20 70 65 72 6d |cess, an|d a perm|
|00000b90| 61 6e 65 6e 74 20 6c 6f | 63 6b 20 77 68 69 63 68 |anent lo|ck which|
|00000ba0| 20 72 65 63 6f 72 64 73 | 20 74 68 65 20 6c 61 73 | records| the las|
|00000bb0| 74 20 74 69 6d 65 20 61 | 74 0d 0a 77 68 69 63 68 |t time a|t..which|
|00000bc0| 20 74 68 65 20 72 65 73 | 6f 75 72 63 65 20 77 61 | the res|ource wa|
|00000bd0| 73 20 61 63 63 65 73 73 | 65 64 2e 20 53 65 65 20 |s access|ed. See |
|00000be0| 66 69 67 75 72 65 20 3c | 41 20 48 52 45 46 3d 22 |figure <|A HREF="|
|00000bf0| 6e 6f 64 65 33 5f 63 74 | 2e 68 74 6d 6c 23 63 6f |node3_ct|.html#co|
|00000c00| 6d 70 6f 6e 65 6e 74 73 | 22 3e 3c 49 4d 47 20 20 |mponents|"><IMG |
|00000c10| 41 4c 54 3d 22 5b 2a 5d | 22 20 53 52 43 3d 22 63 |ALT="[*]|" SRC="c|
|00000c20| 72 6f 73 73 72 65 66 2e | 70 6e 67 22 3e 3c 2f 41 |rossref.|png"></A|
|00000c30| 3e 2e 20 54 68 65 0d 0a | 6c 61 74 74 65 72 20 69 |>. The..|latter i|
|00000c40| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 63 61 6e 20 62 |nformati|on can b|
|00000c50| 65 20 65 6e 63 61 70 73 | 75 6c 61 74 65 64 20 69 |e encaps|ulated i|
|00000c60| 6e 20 61 20 73 69 6e 67 | 6c 65 20 69 6e 6f 64 65 |n a sing|le inode|
|00000c70| 20 77 69 74 68 6f 75 74 | 20 75 73 69 6e 67 0d 0a | without| using..|
|00000c80| 61 6e 79 20 64 69 73 6b | 20 62 6c 6f 63 6b 73 20 |any disk| blocks |
|00000c90| 61 6e 64 20 70 72 6f 76 | 69 64 65 73 20 74 68 65 |and prov|ides the|
|00000ca0| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 6e 65 63 | informa|tion nec|
|00000cb0| 65 73 73 61 72 79 20 74 | 6f 20 72 65 73 74 72 69 |essary t|o restri|
|00000cc0| 63 74 20 74 68 65 0d 0a | 66 72 65 71 75 65 6e 63 |ct the..|frequenc|
|00000cd0| 79 20 6f 66 20 61 63 63 | 65 73 73 2e 20 57 65 20 |y of acc|ess. We |
|00000ce0| 63 61 6c 6c 20 74 68 69 | 73 20 61 6e 20 61 6e 74 |call thi|s an ant|
|00000cf0| 69 2d 73 70 61 6d 6d 69 | 6e 67 20 6c 6f 63 6b 2e |i-spammi|ng lock.|
|00000d00| 0a 3c 2f 45 4d 3e 0a 3c | 50 3e 0a 3c 44 49 56 20 |.</EM>.<|P>.<DIV |
|00000d10| 63 6c 61 73 73 3d 22 43 | 45 4e 54 45 52 22 3e 3c |class="C|ENTER"><|
|00000d20| 41 20 49 44 3d 22 63 6f | 6d 70 6f 6e 65 6e 74 73 |A ID="co|mponents|
|00000d30| 22 3e 3c 2f 41 3e 3c 41 | 20 49 44 3d 22 35 30 22 |"></A><A| ID="50"|
|00000d40| 3e 3c 2f 41 3e 0a 3c 54 | 41 42 4c 45 3e 0a 3c 43 |></A>.<T|ABLE>.<C|
|00000d50| 41 50 54 49 4f 4e 20 63 | 6c 61 73 73 3d 22 42 4f |APTION c|lass="BO|
|00000d60| 54 54 4f 4d 22 3e 3c 53 | 54 52 4f 4e 47 3e 46 69 |TTOM"><S|TRONG>Fi|
|00000d70| 67 75 72 65 3a 3c 2f 53 | 54 52 4f 4e 47 3e 0a 54 |gure:</S|TRONG>.T|
|00000d80| 68 65 20 61 64 61 70 74 | 69 76 65 20 6c 6f 63 6b |he adapt|ive lock|
|00000d90| 20 63 6f 6d 70 6f 6e 65 | 6e 74 73 20 66 6f 72 20 | compone|nts for |
|00000da0| 61 6e 20 61 74 6f 6d 2e | 3c 2f 43 41 50 54 49 4f |an atom.|</CAPTIO|
|00000db0| 4e 3e 0a 3c 54 52 3e 3c | 54 44 3e 3c 49 4d 47 0a |N>.<TR><|TD><IMG.|
|00000dc0| 20 53 54 59 4c 45 3d 22 | 68 65 69 67 68 74 3a 20 | STYLE="|height: |
|00000dd0| 33 31 34 2e 30 30 65 78 | 3b 20 22 20 53 52 43 3d |314.00ex|; " SRC=|
|00000de0| 22 69 6d 67 31 2e 70 6e | 67 22 0a 20 41 4c 54 3d |"img1.pn|g". ALT=|
|00000df0| 22 5c 62 65 67 69 6e 7b | 66 69 67 75 72 65 7d 0a |"\begin{|figure}.|
|00000e00| 5c 63 65 6e 74 65 72 6c | 69 6e 65 7b 0a 5c 62 65 |\centerl|ine{.\be|
|00000e10| 67 69 6e 7b 70 69 63 74 | 75 72 65 7d 28 31 39 30 |gin{pict|ure}(190|
|00000e20| 2c 31 30 30 29 28 30 2c | 30 29 0a 5c 70 75 74 28 |,100)(0,|0).\put(|
|00000e30| 31 30 30 2c 38 30 29 7b | 5c 6f 76 61 6c 28 2e 2e |100,80){|\oval(..|
|00000e40| 2e 0a 2e 2e 2e 2d 32 2c | 2d 31 29 7b 35 33 7d 7d |.....-2,|-1){53}}|
|00000e50| 0a 5c 70 75 74 28 31 30 | 30 2c 35 39 29 7b 5c 76 |.\put(10|0,59){\v|
|00000e60| 65 63 74 6f 72 28 20 32 | 2c 2d 31 29 7b 35 33 7d |ector( 2|,-1){53}|
|00000e70| 7d 0a 5c 65 6e 64 7b 70 | 69 63 74 75 72 65 7d 0a |}.\end{p|icture}.|
|00000e80| 7d 0a 5c 65 6e 64 7b 66 | 69 67 75 72 65 7d 22 3e |}.\end{f|igure}">|
|00000e90| 3c 2f 54 44 3e 3c 2f 54 | 52 3e 0a 3c 2f 54 41 42 |</TD></T|R>.</TAB|
|00000ea0| 4c 45 3e 0a 3c 2f 44 49 | 56 3e 0a 3c 50 3e 0a 3c |LE>.</DI|V>.<P>.<|
|00000eb0| 45 4d 3e 49 66 20 61 20 | 6c 6f 63 6b 20 61 6c 72 |EM>If a |lock alr|
|00000ec0| 65 61 64 79 20 65 78 69 | 73 74 73 20 66 6f 72 20 |eady exi|sts for |
|00000ed0| 61 20 73 70 65 63 69 66 | 69 65 64 20 61 74 6f 6d |a specif|ied atom|
|00000ee0| 2c 20 61 6e 64 20 74 68 | 61 74 20 6c 6f 63 6b 20 |, and th|at lock |
|00000ef0| 68 61 73 20 6e 6f 74 0d | 0a 65 78 70 69 72 65 64 |has not.|.expired|
|00000f00| 2c 20 74 68 65 20 61 74 | 6f 6d 20 72 65 6d 61 69 |, the at|om remai|
|00000f10| 6e 73 20 6c 6f 63 6b 65 | 64 20 61 6e 64 20 61 63 |ns locke|d and ac|
|00000f20| 63 65 73 73 20 74 6f 20 | 74 68 65 20 61 74 6f 6d |cess to |the atom|
|00000f30| 20 69 73 20 64 65 6e 69 | 65 64 2e 0d 0a 4c 6f 63 | is deni|ed...Loc|
|00000f40| 6b 20 65 78 70 69 72 79 | 20 6f 63 63 75 72 73 20 |k expiry| occurs |
|00000f50| 77 68 65 6e 20 61 20 63 | 65 72 74 61 69 6e 20 70 |when a c|ertain p|
|00000f60| 72 65 64 65 66 69 6e 65 | 64 20 70 65 72 69 6f 64 |redefine|d period|
|00000f70| 20 6f 66 20 74 69 6d 65 | 20 68 61 73 0d 0a 65 6c | of time| has..el|
|00000f80| 61 70 73 65 64 20 73 69 | 6e 63 65 20 74 68 65 20 |apsed si|nce the |
|00000f90| 61 63 74 69 76 65 20 6c | 6f 63 6b 20 77 61 73 20 |active l|ock was |
|00000fa0| 63 72 65 61 74 65 64 2e | 20 49 6e 20 74 68 69 73 |created.| In this|
|00000fb0| 20 63 61 73 65 2c 20 61 | 20 67 61 72 62 61 67 65 | case, a| garbage|
|00000fc0| 0d 0a 63 6f 6c 6c 65 63 | 74 69 6f 6e 20 6d 65 63 |..collec|tion mec|
|00000fd0| 68 61 6e 69 73 6d 20 61 | 74 74 65 6d 70 74 73 20 |hanism a|ttempts |
|00000fe0| 74 6f 20 63 61 72 65 66 | 75 6c 6c 79 20 65 6c 69 |to caref|ully eli|
|00000ff0| 6d 69 6e 61 74 65 20 74 | 68 65 20 70 72 6f 63 65 |minate t|he proce|
|00001000| 73 73 0d 0a 61 74 74 61 | 63 68 65 64 20 74 6f 20 |ss..atta|ched to |
|00001010| 74 68 65 20 68 61 6e 67 | 69 6e 67 20 6c 6f 63 6b |the hang|ing lock|
|00001020| 20 28 69 66 20 69 74 20 | 73 74 69 6c 6c 20 65 78 | (if it |still ex|
|00001030| 69 73 74 73 29 20 61 6e | 64 20 74 68 65 6e 20 72 |ists) an|d then r|
|00001040| 65 6d 6f 76 65 20 74 68 | 65 0d 0a 6f 6c 64 20 6c |emove th|e..old l|
|00001050| 6f 63 6b 2c 20 72 65 70 | 6c 61 63 69 6e 67 20 69 |ock, rep|lacing i|
|00001060| 74 20 77 69 74 68 20 61 | 20 6e 65 77 20 6f 6e 65 |t with a| new one|
|00001070| 20 61 6e 64 20 70 65 72 | 6d 69 74 74 69 6e 67 20 | and per|mitting |
|00001080| 74 68 65 20 6b 69 6c 6c | 69 6e 67 0d 0a 70 72 6f |the kill|ing..pro|
|00001090| 63 65 73 73 20 74 6f 20 | 74 61 6b 65 20 6f 76 65 |cess to |take ove|
|000010a0| 72 20 74 68 65 20 74 61 | 73 6b 2e 20 20 54 68 65 |r the ta|sk. The|
|000010b0| 20 74 68 69 72 64 20 70 | 6f 73 73 69 62 69 6c 69 | third p|ossibili|
|000010c0| 74 79 20 69 73 20 74 68 | 61 74 20 6e 6f 0d 0a 61 |ty is th|at no..a|
|000010d0| 63 74 69 76 65 20 6c 6f | 63 6b 20 65 78 69 73 74 |ctive lo|ck exist|
|000010e0| 73 20 66 6f 72 20 61 6e | 20 61 74 6f 6d 2c 20 62 |s for an| atom, b|
|000010f0| 75 74 20 74 68 61 74 20 | 74 68 65 20 74 69 6d 65 |ut that |the time|
|00001100| 20 73 69 6e 63 65 20 69 | 74 73 20 70 72 65 76 69 | since i|ts previ|
|00001110| 6f 75 73 0d 0a 65 78 65 | 63 75 74 69 6f 6e 20 69 |ous..exe|cution i|
|00001120| 73 20 74 6f 6f 20 73 68 | 6f 72 74 2e 20 20 54 68 |s too sh|ort. Th|
|00001130| 69 73 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 69 |is infor|mation i|
|00001140| 73 20 67 6c 65 61 6e 65 | 64 20 66 72 6f 6d 20 74 |s gleane|d from t|
|00001150| 68 65 0d 0a 70 65 72 6d | 61 6e 65 6e 74 20 6c 6f |he..perm|anent lo|
|00001160| 63 6b 2e 20 49 6e 20 74 | 68 61 74 20 63 61 73 65 |ck. In t|hat case|
|00001170| 20 61 63 63 65 73 73 20 | 74 6f 20 74 68 65 20 61 | access |to the a|
|00001180| 74 6f 6d 20 69 73 20 61 | 6c 73 6f 20 64 65 6e 69 |tom is a|lso deni|
|00001190| 65 64 2e 20 54 68 69 73 | 0d 0a 66 65 61 74 75 72 |ed. This|..featur|
|000011a0| 65 20 67 69 76 65 73 20 | 75 73 20 74 68 65 20 60 |e gives |us the `|
|000011b0| 61 6e 74 69 2d 73 70 61 | 6d 6d 69 6e 67 27 20 66 |anti-spa|mming' f|
|000011c0| 75 6e 63 74 69 6f 6e 61 | 6c 69 74 79 2e 0a 3c 2f |unctiona|lity..</|
|000011d0| 45 4d 3e 0a 3c 50 3e 0a | 3c 44 49 56 20 63 6c 61 |EM>.<P>.|<DIV cla|
|000011e0| 73 73 3d 22 43 45 4e 54 | 45 52 22 3e 3c 41 20 49 |ss="CENT|ER"><A I|
|000011f0| 44 3d 22 75 67 68 22 3e | 3c 2f 41 3e 3c 41 20 49 |D="ugh">|</A><A I|
|00001200| 44 3d 22 34 33 35 22 3e | 3c 2f 41 3e 0a 3c 54 41 |D="435">|</A>.<TA|
|00001210| 42 4c 45 3e 0a 3c 43 41 | 50 54 49 4f 4e 20 63 6c |BLE>.<CA|PTION cl|
|00001220| 61 73 73 3d 22 42 4f 54 | 54 4f 4d 22 3e 3c 53 54 |ass="BOT|TOM"><ST|
|00001230| 52 4f 4e 47 3e 46 69 67 | 75 72 65 3a 3c 2f 53 54 |RONG>Fig|ure:</ST|
|00001240| 52 4f 4e 47 3e 0a 41 20 | 73 63 68 65 6d 61 74 69 |RONG>.A |schemati|
|00001250| 63 20 69 6c 6c 75 73 74 | 72 61 74 69 6f 6e 20 6f |c illust|ration o|
|00001260| 66 20 74 68 65 20 62 65 | 68 61 76 69 6f 75 72 20 |f the be|haviour |
|00001270| 6f 66 20 6c 6f 63 6b 73 | 20 77 69 74 68 0d 0a 72 |of locks| with..r|
|00001280| 65 73 70 65 63 74 20 74 | 6f 20 74 68 65 20 73 63 |espect t|o the sc|
|00001290| 68 65 64 75 6c 69 6e 67 | 20 69 6e 74 65 72 76 61 |heduling| interva|
|000012a0| 6c 20 3c 49 3e 26 23 39 | 31 36 3b 74 3c 2f 49 3e |l <I>	|16;t</I>|
|000012b0| 20 61 6e 64 20 74 68 65 | 20 70 61 72 61 6d 65 74 | and the| paramet|
|000012c0| 65 72 73 20 3c 54 54 3e | 49 66 45 6c 61 70 73 65 |ers <TT>|IfElapse|
|000012d0| 64 3c 2f 54 54 3e 20 61 | 6e 64 20 3c 54 54 3e 45 |d</TT> a|nd <TT>E|
|000012e0| 78 70 69 72 65 41 66 74 | 65 72 3c 2f 54 54 3e 2e |xpireAft|er</TT>.|
|000012f0| 3c 2f 43 41 50 54 49 4f | 4e 3e 0a 3c 54 52 3e 3c |</CAPTIO|N>.<TR><|
|00001300| 54 44 3e 3c 49 4d 47 0a | 20 53 54 59 4c 45 3d 22 |TD><IMG.| STYLE="|
|00001310| 68 65 69 67 68 74 3a 20 | 33 31 34 2e 30 30 65 78 |height: |314.00ex|
|00001320| 3b 20 22 20 53 52 43 3d | 22 69 6d 67 32 2e 70 6e |; " SRC=|"img2.pn|
|00001330| 67 22 0a 20 41 4c 54 3d | 22 5c 62 65 67 69 6e 7b |g". ALT=|"\begin{|
|00001340| 66 69 67 75 72 65 2a 7d | 0a 5c 63 65 6e 74 65 72 |figure*}|.\center|
|00001350| 6c 69 6e 65 7b 0a 5c 62 | 65 67 69 6e 7b 70 69 63 |line{.\b|egin{pic|
|00001360| 74 75 72 65 7d 28 34 30 | 30 2c 32 31 33 29 28 30 |ture}(40|0,213)(0|
|00001370| 2c 30 29 0a 5c 70 75 74 | 28 30 2c 31 32 29 7b 5c |,0).\put|(0,12){\|
|00001380| 76 65 63 74 6f 72 2e 2e | 2e 0a 2e 2e 2e 30 2c 31 |vector..|.....0,1|
|00001390| 29 7b 30 2e 32 7d 7d 0a | 5c 70 75 74 28 33 31 35 |){0.2}}.|\put(315|
|000013a0| 2c 31 38 38 29 7b 5c 76 | 65 63 74 6f 72 28 30 2c |,188){\v|ector(0,|
|000013b0| 2d 31 29 7b 35 39 7d 7d | 0a 5c 65 6e 64 7b 70 69 |-1){59}}|.\end{pi|
|000013c0| 63 74 75 72 65 7d 0a 7d | 0a 5c 65 6e 64 7b 66 69 |cture}.}|.\end{fi|
|000013d0| 67 75 72 65 2a 7d 22 3e | 3c 2f 54 44 3e 3c 2f 54 |gure*}">|</TD></T|
|000013e0| 52 3e 0a 3c 2f 54 41 42 | 4c 45 3e 0a 3c 2f 44 49 |R>.</TAB|LE>.</DI|
|000013f0| 56 3e 0a 3c 50 3e 0a 3c | 45 4d 3e 41 20 72 65 63 |V>.<P>.<|EM>A rec|
|00001400| 6f 72 64 20 6f 66 20 74 | 68 65 73 65 20 6c 6f 63 |ord of t|hese loc|
|00001410| 6b 20 74 72 61 6e 73 61 | 63 74 69 6f 6e 73 20 69 |k transa|ctions i|
|00001420| 73 20 6b 65 70 74 20 66 | 6f 72 20 73 75 62 73 65 |s kept f|or subse|
|00001430| 71 75 65 6e 74 20 61 6e | 61 6c 79 73 69 73 20 69 |quent an|alysis i|
|00001440| 66 0d 0a 72 65 71 75 69 | 72 65 64 2e 20 54 68 69 |f..requi|red. Thi|
|00001450| 73 20 69 6e 64 69 63 61 | 74 65 73 20 77 68 65 6e |s indica|tes when|
|00001460| 20 61 6e 64 20 68 6f 77 | 20 6c 6f 63 6b 73 20 77 | and how| locks w|
|00001470| 65 72 65 20 63 72 65 61 | 74 65 64 20 61 6e 64 20 |ere crea|ted and |
|00001480| 72 65 6d 6f 76 65 64 2c | 0d 0a 74 68 65 72 65 62 |removed,|..thereb|
|00001490| 79 20 61 6c 6c 6f 77 69 | 6e 67 20 70 72 6f 62 6c |y allowi|ng probl|
|000014a0| 65 6d 20 63 61 73 65 73 | 2c 20 73 75 63 68 20 61 |em cases|, such a|
|000014b0| 73 20 6c 6f 63 6b 73 20 | 77 68 69 63 68 20 61 6c |s locks |which al|
|000014c0| 77 61 79 73 20 6e 65 65 | 64 20 74 6f 20 62 65 0d |ways nee|d to be.|
|000014d0| 0a 72 65 6d 6f 76 65 64 | 20 66 6f 72 63 69 62 6c |.removed| forcibl|
|000014e0| 79 2c 20 74 6f 20 62 65 | 20 74 72 61 63 65 64 2e |y, to be| traced.|
|000014f0| 0a 3c 2f 45 4d 3e 0a 3c | 50 3e 0a 3c 44 49 56 20 |.</EM>.<|P>.<DIV |
|00001500| 63 6c 61 73 73 3d 22 43 | 45 4e 54 45 52 22 3e 3c |class="C|ENTER"><|
|00001510| 41 20 49 44 3d 22 34 33 | 36 22 3e 3c 2f 41 3e 0a |A ID="43|6"></A>.|
|00001520| 3c 54 41 42 4c 45 3e 0a | 3c 43 41 50 54 49 4f 4e |<TABLE>.|<CAPTION|
|00001530| 20 63 6c 61 73 73 3d 22 | 42 4f 54 54 4f 4d 22 3e | class="|BOTTOM">|
|00001540| 3c 53 54 52 4f 4e 47 3e | 46 69 67 75 72 65 3a 3c |<STRONG>|Figure:<|
|00001550| 2f 53 54 52 4f 4e 47 3e | 0a 41 20 73 63 68 65 6d |/STRONG>|.A schem|
|00001560| 61 74 69 63 20 61 6c 67 | 6f 72 69 74 68 6d 20 66 |atic alg|orithm f|
|00001570| 6f 72 20 69 6d 70 6c 65 | 6d 65 6e 74 69 6e 67 20 |or imple|menting |
|00001580| 74 68 65 20 6c 6f 63 6b | 69 6e 67 0d 0a 70 6f 6c |the lock|ing..pol|
|00001590| 69 63 79 2e 20 54 68 65 | 20 66 75 6e 63 74 69 6f |icy. The| functio|
|000015a0| 6e 20 63 61 6c 6c 20 3c | 54 54 3e 47 65 74 4c 6f |n call <|TT>GetLo|
|000015b0| 63 6b 28 29 3c 2f 54 54 | 3e 20 74 61 6b 65 73 20 |ck()</TT|> takes |
|000015c0| 61 72 67 75 6d 65 6e 74 | 73 20 77 68 69 63 68 20 |argument|s which |
|000015d0| 61 72 65 0d 0a 75 73 65 | 64 20 74 6f 20 62 75 69 |are..use|d to bui|
|000015e0| 6c 64 20 61 20 75 6e 69 | 71 75 65 20 6e 61 6d 65 |ld a uni|que name|
|000015f0| 2e 20 4f 70 65 72 61 74 | 6f 72 20 61 6e 64 20 6f |. Operat|or and o|
|00001600| 70 65 72 61 6e 64 20 70 | 65 72 74 61 69 6e 20 74 |perand p|ertain t|
|00001610| 6f 20 74 68 65 20 61 74 | 6f 6d 0d 0a 77 68 69 63 |o the at|om..whic|
|00001620| 68 20 69 73 20 74 6f 20 | 62 65 20 6c 6f 63 6b 65 |h is to |be locke|
|00001630| 64 2e 20 54 68 65 20 65 | 78 70 69 72 79 20 74 69 |d. The e|xpiry ti|
|00001640| 6d 65 20 61 6e 64 20 65 | 6c 61 70 73 65 64 20 74 |me and e|lapsed t|
|00001650| 69 6d 65 20 6c 69 6d 69 | 74 73 20 61 72 65 0d 0a |ime limi|ts are..|
|00001660| 74 69 6d 65 73 20 69 6e | 20 6d 69 6e 75 74 65 73 |times in| minutes|
|00001670| 2c 20 61 6e 64 20 74 68 | 65 20 3c 54 54 3e 6e 6f |, and th|e <TT>no|
|00001680| 77 3c 2f 54 54 3e 20 70 | 61 72 61 6d 65 74 65 72 |w</TT> p|arameter|
|00001690| 20 69 73 20 74 68 65 20 | 73 79 73 74 65 6d 20 63 | is the |system c|
|000016a0| 6c 6f 63 6b 0d 0a 76 61 | 6c 75 65 20 66 6f 72 20 |lock..va|lue for |
|000016b0| 74 68 65 20 74 69 6d 65 | 20 61 74 20 77 68 69 63 |the time| at whic|
|000016c0| 68 20 74 68 65 20 6c 6f | 63 6b 20 69 73 20 63 72 |h the lo|ck is cr|
|000016d0| 65 61 74 65 64 2e 20 54 | 68 65 20 66 75 6e 63 74 |eated. T|he funct|
|000016e0| 69 6f 6e 20 3c 54 54 3e | 47 65 74 4c 61 73 74 4c |ion <TT>|GetLastL|
|000016f0| 6f 63 6b 28 29 3c 2f 54 | 54 3e 20 63 72 65 61 74 |ock()</T|T> creat|
|00001700| 65 73 20 74 68 65 20 61 | 6e 74 69 2d 73 70 61 6d |es the a|nti-spam|
|00001710| 6d 69 6e 67 20 60 6c 61 | 73 74 27 20 6c 6f 63 6b |ming `la|st' lock|
|00001720| 20 69 66 20 69 74 20 64 | 6f 65 73 20 6e 6f 74 0d | if it d|oes not.|
|00001730| 0a 70 72 65 76 69 6f 75 | 73 6c 79 20 65 78 69 73 |.previou|sly exis|
|00001740| 74 2e 20 54 68 69 73 20 | 69 73 20 69 6d 70 6f 72 |t. This |is impor|
|00001750| 74 61 6e 74 20 66 6f 72 | 20 74 68 65 6f 72 65 74 |tant for| theoret|
|00001760| 69 63 61 6c 20 64 65 61 | 64 6c 6f 63 6b 0d 0a 61 |ical dea|dlock..a|
|00001770| 76 6f 69 64 61 6e 63 65 | 2e 3c 2f 43 41 50 54 49 |voidance|.</CAPTI|
|00001780| 4f 4e 3e 0a 3c 54 52 3e | 3c 54 44 3e 3c 49 4d 47 |ON>.<TR>|<TD><IMG|
|00001790| 0a 20 53 54 59 4c 45 3d | 22 68 65 69 67 68 74 3a |. STYLE=|"height:|
|000017a0| 20 33 31 34 2e 30 30 65 | 78 3b 20 22 20 53 52 43 | 314.00e|x; " SRC|
|000017b0| 3d 22 69 6d 67 33 2e 70 | 6e 67 22 0a 20 41 4c 54 |="img3.p|ng". ALT|
|000017c0| 3d 22 5c 62 65 67 69 6e | 7b 66 69 67 75 72 65 2a |="\begin|{figure*|
|000017d0| 7d 0a 5c 62 65 67 69 6e | 7b 76 65 72 62 61 74 69 |}.\begin|{verbati|
|000017e0| 6d 7d 0a 47 65 74 4c 6f | 63 6b 28 6f 70 65 72 61 |m}.GetLo|ck(opera|
|000017f0| 74 6f 72 2c 6f 70 65 72 | 61 6e 64 2c 69 66 65 6c |tor,oper|and,ifel|
|00001800| 61 70 73 65 64 2c 65 78 | 70 69 72 65 61 66 2e 2e |apsed,ex|pireaf..|
|00001810| 2e 0a 2e 2e 2e 6e 69 6e | 67 20 2a 2f 0a 7d 0a 7d |.....nin|g */.}.}|
|00001820| 0a 53 65 74 4c 6f 63 6b | 28 29 3b 0a 72 65 74 75 |.SetLock|();.retu|
|00001830| 72 6e 20 74 72 75 65 3b | 0a 7d 5c 65 6e 64 7b 76 |rn true;|.}\end{v|
|00001840| 65 72 62 61 74 69 6d 7d | 0a 5c 65 6e 64 7b 66 69 |erbatim}|.\end{fi|
|00001850| 67 75 72 65 2a 7d 22 3e | 3c 2f 54 44 3e 3c 2f 54 |gure*}">|</TD></T|
|00001860| 52 3e 0a 3c 2f 54 41 42 | 4c 45 3e 0a 3c 2f 44 49 |R>.</TAB|LE>.</DI|
|00001870| 56 3e 0a 3c 50 3e 0a 3c | 45 4d 3e 54 6f 20 6d 61 |V>.<P>.<|EM>To ma|
|00001880| 6b 65 20 74 68 65 20 6c | 6f 63 6b 69 6e 67 20 62 |ke the l|ocking b|
|00001890| 65 68 61 76 69 6f 75 72 | 20 75 73 65 72 2d 63 6f |ehaviour| user-co|
|000018a0| 6e 66 69 67 75 72 61 62 | 6c 65 20 77 65 20 69 6e |nfigurab|le we in|
|000018b0| 74 72 6f 64 75 63 65 20 | 74 77 6f 0d 0a 70 61 72 |troduce |two..par|
|000018c0| 61 6d 65 74 65 72 73 20 | 63 61 6c 6c 65 64 20 3c |ameters |called <|
|000018d0| 54 54 3e 45 78 70 69 72 | 65 41 66 74 65 72 3c 2f |TT>Expir|eAfter</|
|000018e0| 54 54 3e 20 61 6e 64 20 | 3c 54 54 3e 49 66 45 6c |TT> and |<TT>IfEl|
|000018f0| 61 70 73 65 64 3c 2f 54 | 54 3e 2c 20 77 68 69 63 |apsed</T|T>, whic|
|00001900| 68 20 68 61 76 65 0d 0a | 76 61 6c 75 65 73 20 69 |h have..|values i|
|00001910| 6e 20 6d 69 6e 75 74 65 | 73 2e 20 53 65 65 20 66 |n minute|s. See f|
|00001920| 69 67 75 72 65 20 3c 41 | 20 48 52 45 46 3d 22 6e |igure <A| HREF="n|
|00001930| 6f 64 65 33 5f 63 74 2e | 68 74 6d 6c 23 75 67 68 |ode3_ct.|html#ugh|
|00001940| 22 3e 3c 49 4d 47 20 20 | 41 4c 54 3d 22 5b 2a 5d |"><IMG |ALT="[*]|
|00001950| 22 20 53 52 43 3d 22 63 | 72 6f 73 73 72 65 66 2e |" SRC="c|rossref.|
|00001960| 70 6e 67 22 3e 3c 2f 41 | 3e 2e 20 3c 54 54 3e 45 |png"></A|>. <TT>E|
|00001970| 78 70 69 72 65 41 66 74 | 65 72 3c 2f 54 54 3e 20 |xpireAft|er</TT> |
|00001980| 64 65 73 63 72 69 62 65 | 73 0d 0a 74 68 65 20 6e |describe|s..the n|
|00001990| 75 6d 62 65 72 20 6f 66 | 20 6d 69 6e 75 74 65 73 |umber of| minutes|
|000019a0| 20 61 66 74 65 72 20 63 | 72 65 61 74 69 6f 6e 20 | after c|reation |
|000019b0| 61 74 20 77 68 69 63 68 | 20 61 20 6c 6f 63 6b 20 |at which| a lock |
|000019c0| 73 68 6f 75 6c 64 20 65 | 78 70 69 72 65 2e 20 49 |should e|xpire. I|
|000019d0| 74 0d 0a 69 73 20 6d 65 | 61 73 75 72 65 64 20 66 |t..is me|asured f|
|000019e0| 72 6f 6d 20 74 68 65 20 | 63 72 65 61 74 69 6f 6e |rom the |creation|
|000019f0| 20 74 69 6d 65 2d 73 74 | 61 6d 70 20 6f 6e 20 74 | time-st|amp on t|
|00001a00| 68 65 20 61 63 74 69 76 | 65 20 6c 6f 63 6b 20 74 |he activ|e lock t|
|00001a10| 6f 20 74 68 65 0d 0a 63 | 75 72 72 65 6e 74 20 76 |o the..c|urrent v|
|00001a20| 61 6c 75 65 20 6f 66 20 | 74 68 65 20 73 79 73 74 |alue of |the syst|
|00001a30| 65 6d 20 63 6c 6f 63 6b | 2e 20 20 3c 54 54 3e 49 |em clock|. <TT>I|
|00001a40| 66 45 6c 61 70 73 65 64 | 3c 2f 54 54 3e 20 64 65 |fElapsed|</TT> de|
|00001a50| 73 63 72 69 62 65 73 20 | 74 68 65 0d 0a 6e 75 6d |scribes |the..num|
|00001a60| 62 65 72 20 6f 66 20 6d | 69 6e 75 74 65 73 20 61 |ber of m|inutes a|
|00001a70| 66 74 65 72 20 77 68 69 | 63 68 20 69 74 20 62 65 |fter whi|ch it be|
|00001a80| 63 6f 6d 65 73 20 61 63 | 63 65 70 74 61 62 6c 65 |comes ac|ceptable|
|00001a90| 20 74 6f 20 65 78 65 63 | 75 74 65 20 74 68 65 0d | to exec|ute the.|
|00001aa0| 0a 73 61 6d 65 20 61 74 | 6f 6d 20 61 67 61 69 6e |.same at|om again|
|00001ab0| 2e 20 49 74 20 69 73 20 | 6d 65 61 73 75 72 65 64 |. It is |measured|
|00001ac0| 20 66 72 6f 6d 20 74 68 | 65 20 6d 6f 64 69 66 69 | from th|e modifi|
|00001ad0| 63 61 74 69 6f 6e 20 74 | 69 6d 65 20 73 74 61 6d |cation t|ime stam|
|00001ae0| 70 20 6f 66 0d 0a 74 68 | 65 20 61 6e 74 69 2d 73 |p of..th|e anti-s|
|00001af0| 70 61 6d 6d 69 6e 67 20 | 6c 6f 63 6b 20 74 6f 20 |pamming |lock to |
|00001b00| 74 68 65 20 63 75 72 72 | 65 6e 74 20 76 61 6c 75 |the curr|ent valu|
|00001b10| 65 20 6f 66 20 74 68 65 | 20 73 79 73 74 65 6d 20 |e of the| system |
|00001b20| 63 6c 6f 63 6b 2e 0a 3c | 2f 45 4d 3e 0a 3c 50 3e |clock..<|/EM>.<P>|
|00001b30| 0a 3c 45 4d 3e 57 65 20 | 63 68 6f 6f 73 65 20 74 |.<EM>We |choose t|
|00001b40| 6f 20 72 65 61 64 20 74 | 68 65 20 63 75 72 72 65 |o read t|he curre|
|00001b50| 6e 74 20 74 69 6d 65 20 | 61 73 20 61 20 70 61 72 |nt time |as a par|
|00001b60| 61 6d 65 74 65 72 20 74 | 6f 20 3c 54 54 3e 47 65 |ameter t|o <TT>Ge|
|00001b70| 74 4c 6f 63 6b 28 29 3c | 2f 54 54 3e 2c 0d 0a 72 |tLock()<|/TT>,..r|
|00001b80| 61 74 68 65 72 20 74 68 | 61 6e 20 72 65 61 64 69 |ather th|an readi|
|00001b90| 6e 67 20 69 74 20 64 69 | 72 65 63 74 6c 79 20 69 |ng it di|rectly i|
|00001ba0| 6e 20 74 68 65 20 6c 6f | 63 6b 69 6e 67 20 66 75 |n the lo|cking fu|
|00001bb0| 6e 63 74 69 6f 6e 2c 20 | 66 6f 72 20 74 68 65 0d |nction, |for the.|
|00001bc0| 0a 66 6f 6c 6c 6f 77 69 | 6e 67 20 72 65 61 73 6f |.followi|ng reaso|
|00001bd0| 6e 2e 20 54 68 65 20 6d | 6f 73 74 20 63 6f 72 72 |n. The m|ost corr|
|00001be0| 65 63 74 20 74 69 6d 65 | 20 74 6f 20 75 73 65 20 |ect time| to use |
|00001bf0| 68 65 72 65 20 63 6f 75 | 6c 64 20 62 65 20 63 6f |here cou|ld be co|
|00001c00| 6e 73 74 72 75 65 64 0d | 0a 69 6e 20 6f 6e 65 20 |nstrued.|.in one |
|00001c10| 6f 66 20 74 77 6f 20 77 | 61 79 73 3a 20 69 74 20 |of two w|ays: it |
|00001c20| 63 6f 75 6c 64 20 62 65 | 20 74 61 6b 65 6e 20 61 |could be| taken a|
|00001c30| 73 20 62 65 69 6e 67 20 | 74 68 65 20 74 69 6d 65 |s being |the time|
|00001c40| 20 61 74 20 77 68 69 63 | 68 20 74 68 65 0d 0a 70 | at whic|h the..p|
|00001c50| 72 6f 67 72 61 6d 20 77 | 61 73 20 73 74 61 72 74 |rogram w|as start|
|00001c60| 65 64 2c 20 6f 72 20 61 | 73 20 74 68 65 20 65 78 |ed, or a|s the ex|
|00001c70| 61 63 74 20 74 69 6d 65 | 20 61 74 20 77 68 69 63 |act time| at whic|
|00001c80| 68 20 74 68 65 20 6c 6f | 63 6b 20 63 72 65 61 74 |h the lo|ck creat|
|00001c90| 69 6f 6e 0d 0a 74 61 6b | 65 73 20 70 6c 61 63 65 |ion..tak|es place|
|00001ca0| 2e 20 54 68 65 20 64 69 | 66 66 65 72 65 6e 63 65 |. The di|fference|
|00001cb0| 20 62 65 74 77 65 65 6e | 20 74 68 65 73 65 20 74 | between| these t|
|00001cc0| 69 6d 65 73 20 63 6f 75 | 6c 64 20 64 69 66 66 65 |imes cou|ld diffe|
|00001cd0| 72 20 62 79 0d 0a 73 65 | 63 6f 6e 64 73 2c 20 6d |r by..se|conds, m|
|00001ce0| 69 6e 75 74 65 73 20 6f | 72 20 68 6f 75 72 73 20 |inutes o|r hours |
|00001cf0| 64 65 70 65 6e 64 69 6e | 67 20 6f 6e 20 74 68 65 |dependin|g on the|
|00001d00| 20 6e 61 74 75 72 65 20 | 6f 66 20 74 68 65 20 6a | nature |of the j|
|00001d10| 6f 62 20 62 65 69 6e 67 | 0d 0a 6c 6f 63 6b 65 64 |ob being|..locked|
|00001d20| 2e 20 20 42 79 20 75 73 | 69 6e 67 20 74 68 65 20 |. By us|ing the |
|00001d30| 74 69 6d 65 20 61 74 20 | 77 68 69 63 68 20 74 68 |time at |which th|
|00001d40| 65 20 70 72 6f 67 72 61 | 6d 20 77 61 73 20 73 74 |e progra|m was st|
|00001d50| 61 72 74 65 64 20 66 6f | 72 20 61 6c 6c 0d 0a 6c |arted fo|r all..l|
|00001d60| 6f 63 6b 73 20 74 68 72 | 6f 75 67 68 6f 75 74 20 |ocks thr|oughout |
|00001d70| 74 68 65 20 70 72 6f 67 | 72 61 6d 2c 20 6f 6e 65 |the prog|ram, one|
|00001d80| 20 65 66 66 65 63 74 69 | 76 65 6c 79 20 74 72 65 | effecti|vely tre|
|00001d90| 61 74 73 20 61 20 60 70 | 61 73 73 27 20 6f 66 20 |ats a `p|ass' of |
|00001da0| 74 68 65 0d 0a 70 72 6f | 67 72 61 6d 20 61 73 20 |the..pro|gram as |
|00001db0| 61 20 63 6f 68 65 73 69 | 76 65 20 65 6e 74 69 74 |a cohesi|ve entit|
|00001dc0| 79 3a 20 69 66 20 6f 6e | 65 20 6c 6f 63 6b 20 65 |y: if on|e lock e|
|00001dd0| 78 70 69 72 65 73 20 66 | 6f 72 20 61 20 67 69 76 |xpires f|or a giv|
|00001de0| 65 6e 20 76 61 6c 75 65 | 20 6f 66 0d 0a 3c 54 54 |en value| of..<TT|
|00001df0| 3e 45 78 70 69 72 65 41 | 66 74 65 72 3c 2f 54 54 |>ExpireA|fter</TT|
|00001e00| 3e 2c 20 74 68 65 79 20 | 61 6c 6c 20 65 78 70 69 |>, they |all expi|
|00001e10| 72 65 2e 20 41 20 63 65 | 72 74 61 69 6e 20 6f 72 |re. A ce|rtain or|
|00001e20| 64 65 72 69 6e 67 20 6f | 66 20 61 74 6f 6d 73 20 |dering o|f atoms |
|00001e30| 63 61 6e 20 62 65 0d 0a | 70 72 65 73 65 72 76 65 |can be..|preserve|
|00001e40| 64 2e 20 49 66 2c 20 6f | 6e 20 74 68 65 20 6f 74 |d. If, o|n the ot|
|00001e50| 68 65 72 20 68 61 6e 64 | 2c 20 6f 6e 65 20 61 6c |her hand|, one al|
|00001e60| 77 61 79 73 20 72 65 61 | 64 73 20 74 68 65 20 70 |ways rea|ds the p|
|00001e70| 72 65 73 65 6e 74 20 76 | 61 6c 75 65 0d 0a 6f 66 |resent v|alue..of|
|00001e80| 20 74 68 65 20 73 79 73 | 74 65 6d 20 63 6c 6f 63 | the sys|tem cloc|
|00001e90| 6b 20 64 69 72 65 63 74 | 6c 79 2c 20 74 68 65 20 |k direct|ly, the |
|00001ea0| 6c 6f 63 6b 69 6e 67 20 | 6d 65 63 68 61 6e 69 73 |locking |mechanis|
|00001eb0| 6d 20 62 65 63 6f 6d 65 | 73 20 73 65 6e 73 69 74 |m become|s sensit|
|00001ec0| 69 76 65 0d 0a 74 6f 20 | 74 68 65 20 6c 65 6e 67 |ive..to |the leng|
|00001ed0| 74 68 20 6f 66 20 74 69 | 6d 65 20 69 74 20 68 61 |th of ti|me it ha|
|00001ee0| 73 20 74 61 6b 65 6e 20 | 74 6f 20 65 78 65 63 75 |s taken |to execu|
|00001ef0| 74 65 20 74 68 65 20 64 | 69 66 66 65 72 65 6e 74 |te the d|ifferent|
|00001f00| 20 70 61 72 74 73 20 6f | 66 0d 0a 74 68 65 20 70 | parts o|f..the p|
|00001f10| 72 6f 67 72 61 6d 2e 20 | 42 6f 74 68 20 70 6f 6c |rogram. |Both pol|
|00001f20| 69 63 69 65 73 20 6d 69 | 67 68 74 20 62 65 20 64 |icies mi|ght be d|
|00001f30| 65 73 69 72 61 62 6c 65 | 20 69 6e 20 64 69 66 66 |esirable| in diff|
|00001f40| 65 72 65 6e 74 20 73 69 | 74 75 61 74 69 6f 6e 73 |erent si|tuations|
|00001f50| 2c 0d 0a 73 6f 20 77 65 | 20 64 6f 20 6e 6f 74 20 |,..so we| do not |
|00001f60| 73 65 65 20 66 69 74 20 | 74 6f 20 69 6d 70 6f 73 |see fit |to impos|
|00001f70| 65 20 61 6e 79 20 70 61 | 72 74 69 63 75 6c 61 72 |e any pa|rticular|
|00001f80| 20 72 65 73 74 72 69 63 | 74 69 6f 6e 20 6f 6e 20 | restric|tion on |
|00001f90| 74 68 69 73 2e 0a 3c 2f | 45 4d 3e 0a 3c 50 3e 0a |this..</|EM>.<P>.|
|00001fa0| 3c 45 4d 3e 57 68 65 6e | 20 61 20 6c 6f 63 6b 20 |<EM>When| a lock |
|00001fb0| 68 61 73 20 65 78 70 69 | 72 65 64 2c 20 77 65 20 |has expi|red, we |
|00001fc0| 74 72 79 20 74 6f 20 6b | 69 6c 6c 20 74 68 65 20 |try to k|ill the |
|00001fd0| 6f 77 6e 65 72 20 70 72 | 6f 63 65 73 73 20 6f 66 |owner pr|ocess of|
|00001fe0| 20 74 68 65 0d 0a 65 78 | 70 69 72 65 64 20 6c 6f | the..ex|pired lo|
|00001ff0| 63 6b 2e 20 20 54 68 65 | 20 70 72 6f 63 65 73 73 |ck. The| process|
|00002000| 20 49 44 20 6f 66 20 74 | 68 65 20 65 78 70 69 72 | ID of t|he expir|
|00002010| 65 64 20 70 72 6f 63 65 | 73 73 20 69 73 20 72 65 |ed proce|ss is re|
|00002020| 61 64 20 66 72 6f 6d 20 | 74 68 65 0d 0a 61 63 74 |ad from |the..act|
|00002030| 69 76 65 20 6c 6f 63 6b | 2e 20 54 68 65 6e 20 74 |ive lock|. Then t|
|00002040| 68 65 20 73 69 67 6e 61 | 6c 73 20 3c 54 54 3e 43 |he signa|ls <TT>C|
|00002050| 4f 4e 54 3c 2f 54 54 3e | 2c 20 3c 54 54 3e 49 4e |ONT</TT>|, <TT>IN|
|00002060| 54 3c 2f 54 54 3e 2c 20 | 3c 54 54 3e 54 45 52 4d |T</TT>, |<TT>TERM|
|00002070| 3c 2f 54 54 3e 20 61 6e | 64 0d 0a 3c 54 54 3e 4b |</TT> an|d..<TT>K|
|00002080| 49 4c 4c 3c 2f 54 54 3e | 20 61 72 65 20 73 65 6e |ILL</TT>| are sen|
|00002090| 74 20 69 6e 20 74 68 61 | 74 20 6f 72 64 65 72 2e |t in tha|t order.|
|000020a0| 20 20 4f 6e 20 73 6f 6d | 65 20 73 79 73 74 65 6d | On som|e system|
|000020b0| 73 2c 20 3c 54 54 3e 49 | 4e 54 3c 2f 54 54 3e 20 |s, <TT>I|NT</TT> |
|000020c0| 69 73 20 74 68 65 0d 0a | 6f 6e 6c 79 20 73 69 67 |is the..|only sig|
|000020d0| 6e 61 6c 20 74 68 61 74 | 20 77 69 6c 6c 20 6e 6f |nal that| will no|
|000020e0| 74 20 68 61 6e 67 20 74 | 68 65 20 70 72 6f 63 65 |t hang t|he proce|
|000020f0| 73 73 20 70 65 72 6d 61 | 6e 65 6e 74 6c 79 20 69 |ss perma|nently i|
|00002100| 6e 20 63 61 73 65 20 6f | 66 20 61 0d 0a 64 69 73 |n case o|f a..dis|
|00002110| 6b 2d 77 61 69 74 20 73 | 69 74 75 61 74 69 6f 6e |k-wait s|ituation|
|00002120| 2c 20 74 68 75 73 20 3c | 54 54 3e 49 4e 54 3c 2f |, thus <|TT>INT</|
|00002130| 54 54 3e 20 69 73 20 73 | 65 6e 74 20 66 69 72 73 |TT> is s|ent firs|
|00002140| 74 2e 20 20 54 68 65 6e | 20 74 68 65 20 64 65 66 |t. Then| the def|
|00002150| 61 75 6c 74 0d 0a 74 65 | 72 6d 69 6e 61 74 65 20 |ault..te|rminate |
|00002160| 73 69 67 6e 61 6c 20 3c | 54 54 3e 54 45 52 4d 3c |signal <|TT>TERM<|
|00002170| 2f 54 54 3e 20 69 73 20 | 73 65 6e 74 2c 20 61 6e |/TT> is |sent, an|
|00002180| 64 20 66 69 6e 61 6c 6c | 79 20 74 68 65 20 6e 6f |d finall|y the no|
|00002190| 6e 2d 69 67 6e 6f 72 61 | 62 6c 65 0d 0a 73 69 67 |n-ignora|ble..sig|
|000021a0| 6e 61 6c 20 3c 54 54 3e | 4b 49 4c 4c 3c 2f 54 54 |nal <TT>|KILL</TT|
|000021b0| 3e 20 69 73 20 73 65 6e | 74 2e 20 53 6c 65 65 70 |> is sen|t. Sleep|
|000021c0| 20 70 65 72 69 6f 64 73 | 20 6f 66 20 73 65 76 65 | periods| of seve|
|000021d0| 72 61 6c 20 73 65 63 6f | 6e 64 73 20 73 65 70 61 |ral seco|nds sepa|
|000021e0| 72 61 74 65 0d 0a 74 68 | 65 73 65 20 63 61 6c 6c |rate..th|ese call|
|000021f0| 73 20 74 6f 20 67 69 76 | 65 20 74 68 65 20 6b 65 |s to giv|e the ke|
|00002200| 72 6e 65 6c 20 61 6e 64 | 20 70 72 6f 67 72 61 6d |rnel and| program|
|00002210| 20 74 69 6d 65 20 74 6f | 20 72 65 73 70 6f 6e 64 | time to| respond|
|00002220| 20 74 6f 20 74 68 65 0d | 0a 73 69 67 6e 61 6c 73 | to the.|.signals|
|00002230| 2e 20 20 54 68 65 20 3c | 54 54 3e 43 4f 4e 54 3c |. The <|TT>CONT<|
|00002240| 2f 54 54 3e 20 73 69 67 | 6e 61 6c 20 69 73 20 70 |/TT> sig|nal is p|
|00002250| 6c 61 63 65 64 20 66 69 | 72 73 74 20 69 6e 20 63 |laced fi|rst in c|
|00002260| 61 73 65 20 74 68 65 20 | 70 72 6f 63 65 73 73 0d |ase the |process.|
|00002270| 0a 68 61 73 20 62 65 65 | 6e 20 73 75 73 70 65 6e |.has bee|n suspen|
|00002280| 64 65 64 20 61 6e 64 20 | 77 61 6e 74 73 20 74 6f |ded and |wants to|
|00002290| 20 65 78 69 74 20 73 74 | 72 61 69 67 68 74 20 61 | exit st|raight a|
|000022a0| 77 61 79 2e 20 20 54 68 | 69 73 20 73 68 6f 75 6c |way. Th|is shoul|
|000022b0| 64 20 62 65 0d 0a 68 61 | 72 6d 6c 65 73 73 20 74 |d be..ha|rmless t|
|000022c0| 6f 20 6e 6f 6e 2d 73 75 | 73 70 65 6e 64 65 64 20 |o non-su|spended |
|000022d0| 70 72 6f 63 65 73 73 65 | 73 2e 0a 3c 2f 45 4d 3e |processe|s..</EM>|
|000022e0| 0a 3c 50 3e 0a 3c 48 52 | 3e 0a 0a 3c 2f 42 4f 44 |.<P>.<HR|>..</BOD|
|000022f0| 59 3e 0a 3c 2f 48 54 4d | 4c 3e 0a |Y>.</HTM|L>. |
+--------+-------------------------+-------------------------+--------+--------+